<template>
    <div>
      <div class="nav">
        <router-link to="/mine">
          <img src="../../assets/lyl/image/tuijian/BMQD-1.png" alt="">
        </router-link>
        <p>个人信息</p>
      </div>

      <ul>
        <li>
          <router-link to="/touimg">
            <span>头像</span>
            <div class="right">
              <img :src="src" alt="">
              <img src="/static/lyl/youjian.png" alt="">
            </div>
          </router-link>
        </li>
        <li>
          <router-link to="/nicheng">
            <span>昵称</span>
            <div class="right">
              <span>{{nis}}</span>
              <img src="/static/lyl/youjian.png" alt="">
            </div>
          </router-link>
        </li>
        <li v-for="item in data">
          <router-link :to="item.to">
            <span>{{item.txt}}</span>
            <div class="right">
              <img :src="item.src1" alt="">
              <img :src="item.src" alt="">
            </div>
          </router-link>
        </li>
        <li>
          <router-link to="/bdpone">
            <span>手机号</span>
            <div class="right">
              <span>{{pos}}</span>
              <img src="/static/lyl/youjian.png" alt="">
            </div>
          </router-link>
        </li>
      </ul>

    </div>
</template>

<script>
  import faker from 'faker'
    export default {
      name: "Gerenxinxi",
      data(){
        return {
          src:faker.image.avatar(),
          data:[
            {to:'/erwei',txt:'我的二维码',src1:'/static/lyl/er.png',src:'/static/lyl/youjian.png'},
            {to:'/yaoqima',txt:'我的邀请码',src1:'/static/lyl/er.png',src:'/static/lyl/youjian.png'}
          ]
        }
      },
      computed:{
        nis(){
          return this.$store.state.nichen;
        },
        pos(){
          return this.$store.state.pone;
        }
      }
    }
</script>

<style scoped>
  .nav{
    width: 100%;
    background: #e53e42;
    padding: 3.5rem 0;
    display: flex;
    justify-content: center;
  }
  .nav a{
    position: absolute;
    left: 2rem;
    color: #fff;
    font-size: 34px;
  }
  .nav p{
    font-size: 34px;
    color:#fff;
  }


  ul li{
    border-bottom: 1px solid #ccc;
    padding: 2rem;
  }
  ul li a{
    display: flex;
    justify-content: space-between;
  }
  ul li a span{
    font-size: 28px;
    align-self: center;
  }
  ul li a .right{
    display: flex;
  }
  ul li a .right img:nth-child(1){
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
  }
  ul li a .right img:nth-child(2){
    margin-left: 1rem;
    align-self: center;
  }
</style>
